<?php

use Illuminate\Database\Schema\Blueprint;

class CreatePermissions extends \App\Utils\CreateMigration
{

    function columns(Blueprint $table)
    {
        $table->unsignedInteger('module_id')->default(0)->comment('模块ID');
        $table->string('controller', 200)->nullable()->comment('controller');
        $table->string('action', 50)->nullable()->comment('action');
        $table->string('name', 50)->nullable()->comment('名称');
        $table->index(['module_id', 'controller', 'action']);
    }

    function tableInfo()
    {
        return ['permissions','权限'];
    }
}
